/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014-6-10         luwei
 */

package com.coocaa.x.app.liteplayer.ui;


import android.content.Context;
import com.coocaa.x.app.liteplayer.R;
import com.coocaa.x.framework.utils.LogUtils;


public class SkyConstants {
    public static float mDiv = 1;
    public static float mDpi = 1;

//    public static int shadowWidth;
//    public static int shadowChildWidth;
//    public static int blockSpacing;
//    public static int mainBlockWidth;
//
//    public static int iconWidth;
//    public static int cornerIconWidth;
    public static int toastTextSize;
    
    public static void initResolution(Context context,float div, float dpi)
    {
        mDiv = div;
        mDpi = dpi;
        LogUtils.d("the dpi is " + mDpi);
//        shadowWidth = Div(context.getResources().getDimensionPixelSize(R.dimen.shadow_width));
//        shadowChildWidth = Div(context.getResources().getDimensionPixelSize(R.dimen.shadow_child_width));
//        blockSpacing = Div(context.getResources().getDimensionPixelSize(R.dimen.block_spacing));
//        mainBlockWidth = Div(context.getResources().getDimensionPixelSize(R.dimen.main_block_width));
//        iconWidth = Div(context.getResources().getDimensionPixelSize(R.dimen.icon_width));
//        cornerIconWidth = Div(context.getResources().getDimensionPixelSize(R.dimen.corner_icon_width));
        toastTextSize = Dpi((int) context.getResources().getDimension(R.dimen.toast_text_size));
    }


    public static int Div(int x) {
        return (int) (x * mDiv);
    }

    public static int Dpi(int x) {
        return (int) (x * mDpi);
    }
}
